from services.prod.erp_mapping_services import ErpMappingService

from utils.log_utils import get_logger

# 获取一个命名的日志记录器
logger = get_logger(__name__)


def order_goods_sku_map(outer_ids: list[str],   erp_mapping_service :ErpMappingService):
    try:
        sku_maps = erp_mapping_service.get_erp_mapping_by_erp_ids(outer_ids,erp_mapping_service.session)
        return sku_maps or {}
    except Exception as e:
        logger.error("获取SKU映射失败: %s", e, exc_info=True)
        return {}
